package com.zzl.bonds.ticket.constant.type;

/**
 * 业务类型，1凭证开具，2凭证签收，3转让，4转让签收，5融资
 *
 * @author : gull
 * @date : 2022/2/28 15:29
 */
public enum BusinessTypeEnum {


    TICKET_OPEN(1, "凭证开具"),
    TICKET_OPEN_SIGN(2, "凭证签收"),
    TICKET_TRANSFER(3, "凭证转让"),
    TICKET_TRANSFER_SIGN(4, "转让签收"),
    TICKET_FINANCE(5, "凭证融资"),

    ;

    private Integer code;
    private String value;


    BusinessTypeEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public static String getValue(Integer code) {
        for (BusinessTypeEnum statusEnum : BusinessTypeEnum.values()) {
            if (statusEnum.code.equals(code)) {
                return statusEnum.value;
            }
        }
        return "";
    }


    public Integer getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }
}
